package com.example.travelcomponentdemo;

import com.example.component.SendNotificationUtil;

import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.NotificationCompat;
import android.view.View;
import android.widget.Button;

public class SendNotification extends Activity {
	int i = 0;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.send_notification);
		
		Button send_btn = (Button) findViewById(R.id.button1);
		send_btn.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				SendNotificationUtil.sendNotification("Hello1", "Hello1", getApplicationContext(), SendNotification.class);
//				SendNotificationUtil.sendNotification("Hello2", "Hello2", getApplicationContext(), SendNotification.class);
//				SendNotificationUtil.sendNotification("Hello3", "Hello3", getApplicationContext(), SendNotification.class);
//				createNotification(v);
//				createNotification(v);
//				createNotification(v);
			}
		});
	}
	
	public void createNotification(View view) {
//		NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
//								.setSmallIcon(R.drawable.icon)
//								.setContentTitle("Event tracker")
//								.setContentText("Events received");
//		NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();
//		String[] events = new String[6];
//		// Sets a title for the Inbox style big view
//		inboxStyle.setBigContentTitle("Event tracker details:");
//		// Moves events into the big view
//		for (int i=0; i < events.length; i++) {
//			inboxStyle.addLine(events[i]);
//		}
//		// Moves the big view style object into the notification object.
//		mBuilder.setStyle(inBoxStyle);
	  }
}
